<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>闭包</title>
	</head>
	<body>
		<script>
			// getS(12000, 2000);
			// getS(15000, 3000);
			// getS(15000, 4000);
			function makeS(base) {
				return function (per) {
					return base + per;
				};
			}

			let s1 = makeS(12000);
			let s2 = makeS(15000);
			console.log(s1(2000));
			console.log(s2(3000));
		</script>
	</body>
</html>
